1. Field of the Invention
The present invention relates to an identifier assignment technique. More particularly, the present invention relates to an identifier assignment technique for a communication system.
2. Description of Related Art
In 802.16 communication system, a base station (BS) can manage packets of a same service flow by using a service flow identifier (SFID), for example, management of resource distribution, schedule, quality of service (QoS) and priority, etc. Each time when the BS receives a transmission control protocol/internet protocol (TCP/IP) packet, the BS assigns a SFID to a TCP/IP connection where the packet is belonged for management. When the packet is required to be sent, a connection identifier (CID) is further assigned, and a medium access control (MAC) header containing the CID is added in front of a packet data unit (PDU), and then the packet is sent via a MAC common part sublayer (MAC CPS) and a physical layer. In the following content, how to obtain the SFID and the CID according to the conventional technique is described in detail.
FIG. 1 is a schematic diagram illustrating assignment of a SFID and a CID according to a conventional technique. Regarding the conventional technique, a source address (SA), a source port (SP), a destination address (DA), a destination port (DP) of the packet and a mapping relation of the SFID and the CID are generally recorded within a memory table according to a table lookup method for inquiry and comparison. Each time when a packet is received, the corresponding SFID and CID are inquired according to the SA, SP, DA and DP of the packet. A length of each of the SA, DA and SFID is 32 bits, and a length of each of the SP, DP and CID is 16 bits.
More particularly, a packet to be sent from 140.113.10.100:80 to 140.96.70.96:81 is corresponded to a service flow buffer of SFID 0x80aabbcc (wherein “0x” represents hexadecimal digits), and when the packet is sent via the MAC CPS, the packet is sent by using a header containing CID 0x11aa. Similarly, the packet sent form 140.115.98.145:234 to 140.96.176.26:456 is managed by SFID 0x80aabbcf, and is sent by using a header containing CID 0x11ad.
It should be noted that, according to the conventional method, if 232 service flows are managed, a memory space of 232*(32+16+32+16+32)=512 Gb has to be prepared, which requires a relatively great hardware cost. Moreover, each time when a packet is sent to the BS via a network, a table lookup operation has to be performed to find to the corresponding SFID, which leads to a relatively great calculation amount. To be specific, a complexity of the table lookup operation is O(Nlog N), wherein N represents a number of data stored in the table.